#!/usr/bin/env bash

dir="google/protobuf/plugin/"
files=`ls ${dir} | grep '.proto'`
echo $files
cp -r google ${GOPATH}/src/.
for i in ${files}; do
  prefix=`echo ${i} | cut -d "." -f1`
  protoc -I=. --go_out=${GOPATH}/src ${dir}/${i}
done
cp -r /go/src/github.com/charlesbases/protobuf/types/ .
cp -r ../protobuf /go/